<!--
 * @Author: your name
 * @Date: 2021-08-24 16:13:11
 * @LastEditTime: 2021-12-30 14:05:53
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \jinfeng_up\src\views\feedBack\feedBack.vue
-->
<!--
 * @Author: your name
 * @Date: 2021-06-24 10:14:55
 * @LastEditTime: 2021-08-31 14:02:10
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \jinfengts\src\pages\myLaunch\myLaunch.vue
-->
<template>
    <div class="feedBack">
        <!-- 条件筛选展示部分 -->
        <div class="selectCondition">
            <el-row :class="isDemo?'isHIdden':'noHidden'">
                <el-col :xs="16" :sm="17" :md="18" :lg="20" :xl="20">
                    <el-form
                        :inline="true"
                        :model="SelectConditionForm"
                        ref="SelectConditionForm"
                    >
                        <!-- TODO: 新增筛选条件
                    (1)营销项目名称
                    (2)营销项目状态
                    (3)反馈来源
                    (4)问题类别
          -->
            <!-- 所属产品 -->
                        <el-form-item prop="productId">
                            <el-select
                                v-model="SelectConditionForm.productId"
                                multiple
                                placeholder="请选择所属产品"
                                filterable
                                clearable
                                collapse-tags
                            >
                                <el-option
                                    value=""
                                    label="全部产品"
                                ></el-option>
                                <el-option
                                    v-for="(item, index) in ProductList"
                                    :key="index"
                                    :label="item.name"
                                    :value="item.id"
                                >
                                </el-option>
                            </el-select>
                        </el-form-item>
                        <!-- C1状态 -->
                        <el-form-item prop="c1StatusId">
                            <el-select
                                v-model="SelectConditionForm.c1StatusId"
                                placeholder="请选择C1状态"
                                filterable
                                clearable
                            >
                                <el-option
                                    value=""
                                    label="全部流程节点"
                                ></el-option>
                                <el-option
                                    v-for="(item, index) in C1StatusList"
                                    :key="index"
                                    :label="item.name"
                                    :value="item.id"
                                >
                                </el-option>
                            </el-select>
                        </el-form-item>
                        <!-- 指派人-->
                        <el-form-item prop="assignedUserId">
                            <el-select
                                v-model="SelectConditionForm.assignedUserId"
                                placeholder="请选择指派人"
                                filterable
                                clearable
                            >
                                <el-option
                                    value=""
                                    label="全部指派人"
                                ></el-option>
                                <el-option
                                    v-for="(item, index) in userList"
                                    :key="index"
                                    :label="item.name"
                                    :value="item.id"
                                >
                                </el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item prop="creatorId">
                            <el-select
                                v-model="SelectConditionForm.creatorId"
                                placeholder="请选择创建人"
                                filterable
                                disabled
                            >
                                <el-option
                                    value=""
                                    label="全部创建人"
                                ></el-option>
                                <el-option
                                    v-for="(item, index) in userList"
                                    :key="index"
                                    :label="item.name"
                                    :value="item.id"
                                >
                                </el-option>
                            </el-select>
                        </el-form-item>
                        <!-- 反馈ID-->
                        <el-form-item prop="feedback_number">
                            <el-input
                                placeholder="请输入反馈ID"
                                v-model="SelectConditionForm.feedback_number"
                                clearable
                                oninput="value=value.replace(/[^\d]/g,'')"
                            ></el-input>
                        </el-form-item>

                        <!-- 反馈标题 -->
                        <el-form-item prop="title">
                            <el-input
                                placeholder="请输入反馈标题"
                                v-model="SelectConditionForm.title"
                                clearable
                                @input="onInput()"
                            ></el-input>
                        </el-form-item>
                        <el-form-item prop="linkType">
                            <!-- 请选择反馈类型 -->
                            <el-select
                                v-model="SelectConditionForm.linkType"
                                placeholder="请选择反馈类型"
                                filterable
                                clearable
                            >
                                <el-option
                                    label="全部反馈类型"
                                    value=""
                                ></el-option>
                                <el-option label="反馈" :value="0"></el-option>
                                <el-option label="BUG" :value="1"></el-option>
                                <el-option label="需求" :value="2"></el-option>
                                <el-option
                                    label="BUG/需求"
                                    :value="3"
                                ></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item class="dateTime" prop="dateTime">
                            <el-date-picker
                                v-model="SelectConditionForm.dateTime"
                                type="daterange"
                                :clearable="false"
                                range-separator="至"
                                start-placeholder="开始日期"
                                end-placeholder="结束日期"
                            >
                            </el-date-picker>
                        </el-form-item>

                        <!-- 影响类别 -->
                        <el-form-item prop="InfluenceCategoryId">
                            <el-select
                                v-model="
                                    SelectConditionForm.InfluenceCategoryId
                                "
                                placeholder="请选择影响类别"
                                filterable
                                clearable
                            >
                                <el-option
                                    value=""
                                    label="全部影响类别"
                                ></el-option>
                                <el-option
                                    v-for="(item, index) in influenceCategory"
                                    :key="index"
                                    :label="item.title"
                                    :value="item.id"
                                >
                                </el-option>
                            </el-select>
                        </el-form-item>
                        <!-- 营销项目名称 -->
                        <el-form-item
                            prop="marketProjectNameId"
                            class="slectOptionLengthItem"
                        >
                            <el-select
                                v-model="
                                    SelectConditionForm.marketProjectNameId
                                "
                                placeholder="请选择营销项目名称"
                                class="slectOptionLength"
                                clearable
                                filterable
                            >
                                <el-option
                                    value=""
                                    label="全部营销项目名称"
                                ></el-option>
                                <el-option
                                    v-for="(
                                        item, index
                                    ) in MarketingProjectName"
                                    :key="index"
                                    :label="item.title"
                                    :value="item.id"
                                >
                                </el-option>
                            </el-select>
                        </el-form-item>

                        <!-- 营销项目状态 -->
                        <el-form-item
                            prop="marketProjectStatusId"
                            class="slectOptionLengthItem"
                        >
                            <el-select
                                v-model="
                                    SelectConditionForm.marketProjectStatusId
                                "
                                placeholder="请选择营销项目状态"
                                class="slectOptionLength"
                                clearable
                                filterable
                            >
                                <el-option
                                    value=""
                                    label="全部营销项目状态"
                                ></el-option>
                                <el-option
                                    v-for="(item, index) in problemTypeList"
                                    :key="index"
                                    :label="item.title"
                                    :value="item.id"
                                >
                                </el-option>
                            </el-select>
                        </el-form-item>

                        <!-- C2状态 -->
                        <el-form-item prop="c2Status">
                            <el-select
                                v-model="SelectConditionForm.c2Status"
                                placeholder="请选择C2状态"
                                filterable
                                clearable
                            >
                                <el-option
                                    value=""
                                    label="全部C2状态"
                                ></el-option>
                                <el-option
                                    v-for="(item, index) in C1_C2StatusV"
                                    :key="index"
                                    :label="item.label"
                                    :value="item.value"
                                >
                                </el-option>
                            </el-select>
                        </el-form-item>
                        <!-- 问题类型 -->
                        <el-form-item prop="problemTypeParentId">
                            <el-select
                                v-model="
                                    SelectConditionForm.problemTypeParentId
                                "
                                placeholder="请选择一级问题类型"
                                @change="changeBigCatlog"
                                filterable
                                clearable
                            >
                                <el-option
                                    value=""
                                    label="全部一级问题类型"
                                ></el-option>
                                <el-option
                                    v-for="(
                                        item, index
                                    ) in marketProjectFirstList"
                                    :key="index"
                                    :label="item.name"
                                    :value="item.id"
                                ></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item prop="problemTypeId">
                            <el-select
                                v-model="SelectConditionForm.problemTypeId"
                                placeholder="请选择二级问题类型"
                                filterable
                                clearable
                            >
                                <el-option
                                    value=""
                                    label="全部二级问题类型"
                                ></el-option>
                                <el-option
                                    v-for="(
                                        item, index
                                    ) in marketProjectSecondList"
                                    :key="index"
                                    :label="item.name"
                                    :value="item.id"
                                ></el-option>
                            </el-select>
                        </el-form-item>

                        <!-- 反馈来源  -->
                        <el-form-item prop="feedBackSourceId">
                            <el-select
                                v-model="SelectConditionForm.feedBackSourceId"
                                placeholder="请选择反馈来源"
                                filterable
                                clearable
                            >
                                <el-option
                                    value=""
                                    label="全部反馈来源"
                                ></el-option>
                                <el-option
                                    v-for="(item, index) in feedBackSourceList"
                                    :key="index"
                                    :label="item.title"
                                    :value="item.id"
                                >
                                </el-option>
                            </el-select>
                        </el-form-item>

                        <!-- 状态标识 -->
                        <el-form-item prop="ctag">
                            <el-select
                                v-model="SelectConditionForm.ctag"
                                placeholder="请选择状态标识"
                                filterable
                                clearable
                            >
                                <el-option
                                    value=""
                                    label="全部状态标识"
                                ></el-option>
                                <el-option
                                    v-for="(item, index) in ctag"
                                    :key="index"
                                    :label="item.title"
                                    :value="item.value"
                                >
                                </el-option>
                            </el-select>
                        </el-form-item>

                        <!-- 处理阶段 -->
                        <el-form-item prop="stageId">
                            <el-select
                                v-model="SelectConditionForm.stageId"
                                placeholder="请选择处理阶段名称"
                                filterable
                                clearable
                            >
                                <el-option
                                    value=""
                                    label="全部处理阶段名称"
                                ></el-option>
                                <el-option
                                    v-for="(item, index) in childStageList"
                                    :key="index"
                                    :label="item.name"
                                    :value="item.id"
                                >
                                </el-option>
                            </el-select>
                        </el-form-item>

                        <!-- 是否服务请求 -->
                        <el-form-item prop="serverRequestTag">
                            <el-select
                                v-model="SelectConditionForm.serverRequestTag"
                                placeholder="是否服务请求"
                                filterable
                                clearable
                            >
                                <el-option
                                    value=""
                                    label="是/否服务请求"
                                ></el-option>
                                <el-option :value="true" label="是"></el-option>
                                <el-option
                                    :value="false"
                                    label="否"
                                ></el-option>
                            </el-select>
                        </el-form-item>
                        <!-- 版本号-->
                        <el-form-item prop="versionNumber">
                            <el-select
                                v-model="SelectConditionForm.versionNumber"
                                placeholder="请选择版本号"
                                filterable
                                clearable
                            >
                                <el-option
                                    value=""
                                    label="全部版本号"
                                ></el-option>
                                <el-option
                                    v-for="(item, index) in versionList"
                                    :key="index"
                                    :label="item"
                                    :value="item"
                                >
                                </el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item prop="feedback_status">
                            <!-- 请选择反馈整体状态 -->
                            <el-select
                                v-model="SelectConditionForm.feedback_status"
                                placeholder="请选择反馈整体状态"
                                filterable
                                clearable
                            >
                                <el-option
                                    label="全部反馈"
                                    value=""
                                ></el-option>
                                <el-option
                                    label="处理中"
                                    :value="1"
                                ></el-option>
                                <el-option
                                    label="已关闭"
                                    :value="2"
                                ></el-option>
                                <el-option
                                    label="已终止"
                                    :value="3"
                                ></el-option>
                            </el-select>
                        </el-form-item>

                        <!-- 关闭原因 -->
                        <el-form-item prop="closeTheReason">
                            <el-select
                                v-model="SelectConditionForm.closeTheReason"
                                placeholder="请选1111"
                                filterable
                                clearable
                                @change="getFeedBackCloseSet"
                            >
                                <el-option  value="" label="全部关闭原因"></el-option>
                                <el-option
                                    v-for="(item, index) in closeFeedBackReasonList"
                                    :key="index"
                                    :label="item.title"
                                    :value="item.id"
                                >
                                </el-option>
                            </el-select>
                        </el-form-item>
                        <!-- 解决方案 -->
                        <el-form-item prop="content">
                            <el-select
                                v-model="SelectConditionForm.content"
                                placeholder="请选择解决方案"
                                filterable
                                clearable
                            >
                                <el-option
                                    value=""
                                    label="全部解决方案"
                                ></el-option>
                                <el-option
                                    v-for="(item, index) in FeedBackCloseSet"
                                    :key="index"
                                    :label="item.title"
                                    :value="item.id"
                                >
                                </el-option>
                            </el-select>
                        </el-form-item>

                    </el-form>
                </el-col>

                <el-col :xs="8" :sm="7" :md="6" :lg="4" :xl="4">
                    <!-- 导出按钮 -->
                    <el-button
                        type="primary"
                        size="small"
                        class="myfeed"
                        v-has="'M1112003'"
                        @click="exportCharts"
                        >导出</el-button
                    >

                    <!-- 重置按钮 -->
                    <el-button
                        @click="reset"
                        class="myfeed"
                        type="primary"
                        v-has="'M1112002'"
                        size="small"
                        >重置</el-button
                    >
                    <!-- 搜索按钮 -->
                    <el-button
                        @click="onSearchKuang('normal')"
                        v-has="'M1112001'"
                        class="myfeed"
                        type="primary"
                        size="small"
                        >搜索</el-button
                    >
                    <!-- <el-button class="myfeed" v-has="'M1103039'" @click="onSearchKuang('self')" type="primary"
            >我的反馈</el-button
          > -->
                </el-col>
            </el-row>
            <div class="demodiv"><span class="demo" @click="istodemo" v-if="!isDemo"></span><span class="demo1" @click="istodemo" v-if="isDemo"></span></div>
        </div>
        <!-- 数据展示部分 -->
        <el-card class="feedBackData">
            <div class="aboutOptions">
                <el-popover
                    placement="bottom-start"
                    width="152"
                    trigger="click"
                >
                    <el-checkbox-group v-model="colOptions" :min="3">
                        <el-checkbox
                            v-for="item in colSelect"
                            :label="item"
                            :key="item"
                        ></el-checkbox>
                    </el-checkbox-group>
                    <el-button
                        class="btnP10"
                        slot="reference"
                        type="primary"
                        size="small"
                        >字段管理</el-button
                    >
                </el-popover>
                <!-- 更新数据 -->
                <!-- <el-button class="export_btn" @click="updateData">更新数据</el-button> -->
                <!-- 创建反馈按钮 -->
                <el-button
                    class="btnP10"
                    type="primary"
                    size="small"
                    v-has="'M1112004'"
                    @click="toinsert"
                    >创建反馈</el-button
                >
                <!-- <el-button class="btnP10"
                   type="primary"
                   v-has="'M1103004'"
                   size="small"
                   @click="bugRows">绑定BUG</el-button>

                   <el-button class="btnP10"
                   type="primary"
                   v-has="'M1103004'"
                   size="small"
                   @click="needRow">绑定需求</el-button> -->
            </div>
            <!-- <el-button type="primary">参数设置</el-button> -->
            <el-table
                max-height="600"
                border
                :data="feedBackList"
                style="width: 100%"
                ref="tableDataRef"
                class="feedBackDataTable"
                :cell-style="{ textAlign: 'center', height: '60px' }"
                :header-cell-style="{
                    textAlign: 'center',
                    height: '50px',
                    backgroundColor: '#FFFFFF',
                }"
            >
              <el-table-column
                    prop="beyondMarkType"
                    label="超期标识"
                    v-if="colData[0].istrue"
                    min-width="102"
                    sortable
                >
                    <template slot="header">
                        <el-tooltip effect="dark" placement="top">
                            <div slot="content">
                                超期标识注释:<br />绿色：未超期<br />蓝色：反馈普通超期<br />橙色：FEMS普通超期<br />红色：严重超期
                            </div>
                            <span>超期标识</span>
                        </el-tooltip>
                    </template>
                    <template slot-scope="scope">
                        <RadioStatusBtn
                            :isClass="true"
                            :type="scope.row.beyondMarkType"
                        >
                        </RadioStatusBtn>
                    </template>
                </el-table-column>
                <el-table-column
                    prop="ctag"
                    label="C1/C2标识"
                    v-if="colData[1].istrue"
                    min-width="70"
                >
                    <template slot="header">
                        <el-tooltip
                            effect="dark"
                            content="创建订单自动生成的编号"
                            placement="top"
                        >
                            <div slot="content">
                                C1/C2标识注释:<br />C1：现场问题分析解决<br />C2：改进/优化<br />C1/C2：现场问题和改进优化并行解决
                            </div>
                            <span>C1/C2标识</span>
                        </el-tooltip>
                    </template>
                    <template slot-scope="scope">
                        <span
                            v-if="scope.row.ctag == 0 && scope.row.ctag != null"
                            >C1</span
                        >
                        <span
                            v-else-if="
                                scope.row.ctag == 1 && scope.row.ctag != null
                            "
                            >C2</span
                        >
                        <span v-else-if="scope.row.ctag != null">C1/C2</span>
                        <span v-else></span>
                    </template>
                </el-table-column>

                <el-table-column
                    label="反馈类型"
                    prop="linkType"
                    v-if="colData[2].istrue"
                    min-width="78"
                >
                    <template slot-scope="scope">
                        {{ scope.row.linkType | transferSeverity(linkType) }}
                    </template>
                </el-table-column>
                <el-table-column
                    prop="feedBackNumber"
                    label="反馈ID"
                    min-width="87"
                    sortable
                    v-if="colData[3].istrue"
                >
                    <template slot-scope="scope">
                        <span
                            @click="tofeedBack(scope.row)"
                            class="toPageLink"
                            >{{ scope.row.feedBackNumber }}</span
                        >
                    </template>
                </el-table-column>
                <el-table-column
                    prop="productName"
                    label="产品名称"
                    min-width="220"
                    v-if="colData[4].istrue"
                >
                    <template slot-scope="scope">
                        <el-tooltip
                            :content="scope.row.productName"
                            placement="top"
                            effect="light"
                        >
                            <span>{{ scope.row.productName }}</span>
                        </el-tooltip>
                    </template>
                </el-table-column>
                <el-table-column
                    prop="title"
                    label="反馈标题"
                    min-width="220"
                    v-if="colData[5].istrue"
                >
                    <template slot-scope="scope">
                        <el-tooltip
                            :content="scope.row.title"
                            placement="top"
                            effect="light"
                        >
                        <span
                            @click="tofeedBack(scope.row)"
                            class="toPageLink"
                            >{{ scope.row.title }}</span
                        >
                            <!-- <span>{{ scope.row.title }}</span> -->
                        </el-tooltip>
                    </template>
                </el-table-column>
                <el-table-column
                    prop="stage"
                    label="处理阶段名称"
                    min-width="108"
                    v-if="colData[6].istrue"
                >
                    <template slot-scope="scope">
                        <span
                            v-if="
                                scope.row.c1StatusId == '1423154128074436609' &&
                                (scope.row.c2Status == 0 ||
                                    scope.row.c2Status == 2 ||
                                    scope.row.c2Status == 3)
                            "
                            >长期跟踪中</span
                        >
                        <span
                            v-else-if="
                                scope.row.c1StatusId == '1423154128074436609' &&
                                scope.row.c2Status == 1
                            "
                            >已完成</span
                        >
                        <span v-else>{{ scope.row.stage }}</span>
                    </template>
                </el-table-column>
                <el-table-column
                    label="流程节点"
                    min-width="90"
                    v-if="colData[7].istrue"
                    prop="c1Status"
                >
                </el-table-column>
                <el-table-column
                    label="C2状态"
                    v-if="colData[8].istrue"
                    prop="c2Status"
                    min-width="80"
                >
                    <template slot-scope="scope">
                        <TaskStatusBtn
                            :isClass="true"
                            :type="scope.row.c2Status"
                            :flowStatusList="C2status"
                        ></TaskStatusBtn>
                    </template>
                </el-table-column><!-- TODO: 待后端更改字段配置信息-->
                <el-table-column
                    prop="serverRequestTag"
                    label="是否服务请求"
                    min-width="90"
                    v-if="colData[9].istrue"
                >
                    <template slot-scope="scope">
                        <span v-if="scope.row.serverRequestTag">是</span>
                        <span v-else>否</span>
                    </template>
                </el-table-column>
                <el-table-column
                    prop="assignedUser"
                    label="指派给"
                    min-width="110"
                    v-if="colData[10].istrue"
                >
                    <template slot-scope="scope">
                        <span v-if="scope.row.feedBackStatus == 2">Closed</span>
                        <span v-else> {{ scope.row.assignedUser }} </span>
                    </template>
                </el-table-column>
                  <el-table-column
                    prop="closeTheReasonString"
                    label="关闭原因"
                    min-width="110"
                    v-if="colData[11].istrue"
                >

                </el-table-column>
                <el-table-column
                    prop="content"
                    label="解决方案"
                    min-width="110"
                    v-if="colData[12].istrue"
                >
                </el-table-column>
                <el-table-column
                    prop="createTime"
                    label="发布时间"
                    min-width="130"
                    v-if="colData[13].istrue"
                    sortable
                >
                    <template slot-scope="scope">
                        <span>{{ scope.row.releaseTime | formatTimer }}</span>
                    </template>
                </el-table-column>
                <el-table-column
                    prop="creator"
                    label="创建人"
                    min-width="110"
                    v-if="colData[14].istrue"
                >
                </el-table-column>
                <el-table-column
                    label="阶段超期标识"
                    min-width="90"
                    prop="stageOverdueTag"
                    v-if="colData[15].istrue"
                >
                    <template slot="header">
                        <el-tooltip effect="dark" placement="top">
                            <div slot="content">
                                阶段超期标识表示各个阶段是否超过单节点时间<br />具体阶段有：排查复现，原因定位，（实验室）制定解决方案，现场执行方案，现场方案确认/沟通等等【每个阶段设置的单节点超期时长不同】
                            </div>
                            <span>阶段超期标识</span>
                        </el-tooltip>
                    </template>
                    <template slot-scope="scope">
                        {{
                            scope.row.stageOverdueTag
                                | transferSeverity(StageOverdueTagEnum)
                        }}
                    </template>
                </el-table-column>
                <el-table-column
                    prop="influenceCategory"
                    min-width="100"
                    label="影响类别"
                    v-if="colData[16].istrue"
                >
                </el-table-column>
                <el-table-column
                    label="营销项目名称"
                    min-width="120"
                    prop="marketProjectName"
                    v-if="colData[17].istrue"
                >
                </el-table-column>
                <el-table-column
                    label="营销项目状态"
                    min-width="90"
                    prop="marketProjectStatus"
                    v-if="colData[18].istrue"
                >
                </el-table-column>
                <el-table-column
                    prop="lastModifedAt"
                    label="最后更新时间"
                    min-width="130"
                    v-if="colData[19].istrue"
                    sortable
                >
                    <template slot-scope="scope">
                        <span v-if="scope.row.lastModifedAt">{{
                            scope.row.lastModifedAt | formatTimer
                        }}</span>
                        <span v-else>{{
                            scope.row.createTime | formatTimer
                        }}</span>
                    </template>
                </el-table-column>
                <el-table-column
                    prop="versionNumber"
                    label="版本号"
                    min-width="90"
                    v-if="colData[20].istrue"
                    show-overflow-tooltip
                >
                    <!-- <template slot-scope="scope">
                        <el-tooltip
                            :content="scope.row.versionNumber"
                            placement="top"
                            effect="light"
                        >
                            <span>{{ scope.row.versionNumber }}</span>
                        </el-tooltip>
                    </template> -->
                </el-table-column>
                <!-- <el-table-column
                    label="版本号"
                    min-width="90"
                    prop="versionNumber"
                    v-if="colData[20].istrue"
                >
                </el-table-column> -->
                <el-table-column
                    label="反馈来源"
                    min-width="110"
                    prop="feedBackSource"
                    v-if="colData[21].istrue"
                >
                </el-table-column>
                <el-table-column
                    prop="creatorDepartment"
                    label="创建人部门"
                    min-width="90"
                    v-if="colData[22].istrue"
                >
                </el-table-column>
                <el-table-column
                    label="一级问题类型"
                    min-width="110"
                    prop="problemTypeParent"
                    v-if="colData[23].istrue"
                >
                </el-table-column>
                <el-table-column
                    label="二级问题类型"
                    min-width="110"
                    prop="problemType"
                    v-if="colData[24].istrue"
                >
                </el-table-column>
                <el-table-column label="操作" width="130" fixed="right">
                    <template slot-scope="scope">
                        <div v-if="scope.row.accountId">
                            <el-tooltip
                                class="item"
                                effect="light"
                                content="激活"
                                v-show="
                                    (scope.row.feedBackStatus === 2 ||
                                        scope.row.feedBackStatus === 3) &&
                                    scope.row.draftTag === false
                                "
                                placement="bottom-start"
                                v-has="'M1112017'"
                            >
                                <span
                                    class="option_life"
                                    @click="startRow(scope.row.id)"
                                ></span>
                            </el-tooltip>
                            <el-tooltip
                                class="item"
                                effect="light"
                                content="终止"
                                v-show="
                                    scope.row.draftTag === false &&
                                    scope.row.feedBackStatus === 1 &&
                                    scope.row.stageId != '1423154037607493634'
                                "
                                placement="bottom-start"
                            >
                                <span
                                    class="option_suspend"
                                    @click="suspendRow(scope.row.id)"
                                ></span>
                            </el-tooltip>
                            <el-tooltip
                                class="item"
                                effect="light"
                                content="关闭"
                                v-show="
                                    scope.row.draftTag === false &&
                                    scope.row.feedBackStatus === 1 &&
                                    !scope.row.c1StatusTag &&
                                    scope.row.stageId != '1423154037607493634'
                                "
                                placement="bottom-start"
                            >
                                <span
                                    class="option_close"
                                    @click="
                                        closeRow(
                                            scope.row.id,
                                            scope.row.feedBackNumber,
                                            scope.row.activateJustNowTag
                                        )
                                    "
                                ></span>
                            </el-tooltip>
                            <el-tooltip
                                class="item"
                                effect="light"
                                content="转任务"
                                v-has="'M1112009'"
                                v-show="
                                    scope.row.draftTag === false &&
                                    scope.row.stageId != '1423154037607493634'
                                "
                                placement="bottom-start"
                            >
                                <span
                                    class="option_task"
                                    @click="taskRow(scope.row)"
                                ></span>
                            </el-tooltip>
                             <el-tooltip
                                class="item"
                                effect="light"
                                content="修改关闭原因"
                                v-has="'M1112022'"
                                v-show="
                                    scope.row.draftTag === false &&
                                    scope.row.c1StatusTag &&
                                    scope.row.stageId != '1423154037607493634'&&
                                    scope.row.closeTheReason==='1437596752060452866'
                                "
                                placement="bottom-start"
                            >
                                <span
                                    class="option_fixClose"
                                    @click="
                                        fixCloseRow(
                                            scope.row.id,
                                            scope.row.feedBackNumber
                                        )
                                    "
                                ></span>
                            </el-tooltip>
                            <el-tooltip
                                class="item"
                                effect="light"
                                content="更新进度"
                                v-show="
                                    scope.row.draftTag === false &&
                                    scope.row.stageId != '1423154037607493634' &&
                                    scope.row.feedBackStatus === 1
                                "
                                v-has="'M1112007'"
                                placement="bottom-start"
                            >
                                <span
                                    class="option_update"
                                    @click="updateRow(scope.row)"
                                ></span>
                            </el-tooltip>
                            <el-tooltip
                                class="item"
                                effect="light"
                                v-has="'M1112023'"
                                content="评论"
                                v-show="scope.row.draftTag === false && scope.row.stageId != '1423154037607493634' && scope.row.c1StatusId === '1423154128074436609'"
                                placement="bottom-start"
                            >
                                <span
                                    class="option_comment"
                                    @click="commentRow(scope.row)"
                                ></span>
                            </el-tooltip>
                            <el-tooltip
                                class="item"
                                effect="light"
                                content="申请上会"
                                v-show="
                                    scope.row.continueToBeTag &&
                                    !scope.row.draftTag &&
                                    (scope.row.feedBackStatus != 2 || scope.row.feedBackStatus != 3) &&
                                    scope.row.feedBackStatus === 1 &&
                                    scope.row.stageId != '1423154037607493634'
                                "
                                v-has="'M1112008'"
                                placement="bottom-start"
                            >
                                <span
                                    class="option_application"
                                    @click="application(scope.row)"
                                ></span>
                            </el-tooltip>
                            <el-tooltip
                                class="item"
                                effect="light"
                                content="编辑"
                                v-show="scope.row.draftTag"
                                v-has="'M1112015'"
                                placement="bottom-start"
                            >
                                <span
                                    class="option_export"
                                    @click="submitForm(scope.row.id)"
                                ></span>
                            </el-tooltip>
                            <el-tooltip
                                class="item"
                                effect="light"
                                content="删除"
                                v-show="
                                    scope.row.draftTag &&
                                    scope.row.stageId != '1423154076169924610' &&
                                    scope.row.feedBackNumber === null
                                "
                                v-has="'M1112016'"
                                placement="bottom-start"
                            >
                                <span
                                    class="option_delete"
                                    @click="deleteRow(scope.row.id)"
                                ></span>
                            </el-tooltip>
                            <el-tooltip
                                class="item"
                                effect="light"
                                content="撤回"
                                v-has="'M1112024'"
                                v-show="
                                    !scope.row.draftTag &&
                                    scope.row.stageId === '1423154037607493634' &&
                                   !scope.row.activateJustNowTag
                                "
                                placement="bottom-start"
                            >
                                <span
                                    class="option_getback"
                                    @click="getBackRow(scope.row.id)"
                                ></span>
                            </el-tooltip>
                            <el-tooltip
                                class="item"
                                effect="light"
                                content="转让"
                                v-show="
                                    !scope.row.draftTag &&
                                    scope.row.feedBackStatus != (2 || 3) &&
                                    scope.row.feedBackStatus === 1 &&
                                    scope.row.stageId != '1423154037607493634'
                                "
                                v-has="'M1112014'"
                                placement="bottom-start"
                            >
                                <span
                                    class="option_transfer"
                                    @click="transferRow(scope.row.id,scope.row.productId)"
                                ></span>
                            </el-tooltip>
                        </div>
                        <div v-else>
                            <!-- <el-tooltip
                class="item"
                effect="light"
                content="编辑"
                placement="bottom-start"
              >
                <span class="option_export" @click="submitForm(scope.row.id)"></span>
              </el-tooltip> -->
                            <!-- <el-tooltip
                class="item"
                effect="light"
                content="删除"
                v-show="scope.row.draftTag && scope.row.stageId != '1423154076169924610'"
                v-has="'M1103016'"
                placement="bottom-start"
              >
                <span class="option_delete" @click="deleteRow(scope.row.id)"></span>
              </el-tooltip> -->
                            <el-tooltip
                                class="item"
                                effect="light"
                                content="确认"
                                v-show="
                                    scope.row.draftTag === false &&
                                    scope.row.stageId === '1423154037607493634'
                                "
                                v-has="'M1112018'"
                                placement="bottom-start"
                            >
                                <span
                                    class="option_confirm"
                                    @click="confirmRow(scope.row.id)"
                                ></span>
                            </el-tooltip>
                            <el-tooltip
                                class="item"
                                effect="light"
                                content="回退"
                                v-show="
                                    scope.row.draftTag === false &&
                                    scope.row.stageId === '1423154037607493634' && !scope.row.activateJustNowTag
                                "
                                v-has="'M1112019'"
                                placement="bottom-start"
                            >
                                <span
                                    class="option_reback"
                                    @click="rebackRow(scope.row.id)"
                                ></span>
                            </el-tooltip>
                            <el-tooltip
                                class="item"
                                effect="light"
                                content="激活"
                                v-show="
                                    (scope.row.feedBackStatus === 2 || scope.row.feedBackStatus === 3) &&
                                    scope.row.draftTag === false
                                "
                                placement="bottom-start"
                                v-has="'M1112017'"
                            >
                                <span
                                    class="option_life"
                                    @click="startRow(scope.row.id)"
                                ></span>
                            </el-tooltip>
                            <!-- <el-tooltip
                                class="item"
                                effect="light"
                                content="终止"
                                v-show="
                                    scope.row.draftTag === false &&
                                    scope.row.feedBackStatus === 1 &&
                                    scope.row.stageId != '1423154037607493634'
                                "
                                v-has="'M1112005'"
                                placement="bottom-start"
                            >
                                <span
                                    class="option_suspend"
                                    @click="suspendRow(scope.row.id)"
                                ></span>
                            </el-tooltip> -->
                            <el-tooltip
                                class="item"
                                effect="light"
                                content="关闭"
                                v-show="
                                    (scope.row.draftTag === false &&
                                    scope.row.feedBackStatus === 1 &&
                                    !scope.row.c1StatusTag &&
                                    scope.row.stageId != '1423154037607493634') || scope.row.activateJustNowTag
                                "
                                v-has="'M1112006'"
                                placement="bottom-start"
                            >
                                <span
                                    class="option_close"
                                    @click="
                                        closeRow(
                                            scope.row.id,
                                            scope.row.feedBackNumber,
                                            scope.row.activateJustNowTag
                                        )
                                    "
                                ></span>
                            </el-tooltip>
                            <el-tooltip
                                class="item"
                                effect="light"
                                content="转任务"
                                v-has="'M1112009'"
                                v-show="
                                    scope.row.draftTag === false &&
                                    scope.row.stageId != '1423154037607493634'
                                "
                                placement="bottom-start"
                            >
                                <span
                                    class="option_task"
                                    @click="taskRow(scope.row)"
                                ></span>
                            </el-tooltip>
                            <el-tooltip
                                class="item"
                                effect="light"
                                content="修改关闭原因"
                                v-has="'M1112022'"
                                v-show="
                                    scope.row.draftTag === false &&
                                    scope.row.c1StatusTag &&
                                    scope.row.stageId != '1423154037607493634'&&
                                    scope.row.closeTheReason==='1437596752060452866'
                                "
                                placement="bottom-start"
                            >
                                <span
                                    class="option_fixClose"
                                    @click="
                                        fixCloseRow(
                                            scope.row.id,
                                            scope.row.feedBackNumber
                                        )
                                    "
                                ></span>
                            </el-tooltip>
                            <el-tooltip
                                class="item"
                                effect="light"
                                content="更新进度"
                                v-show="
                                    scope.row.draftTag === false &&
                                    scope.row.stageId != '1423154037607493634' &&
                                    scope.row.feedBackStatus === 1
                                "
                                v-has="'M1112007'"
                                placement="bottom-start"
                            >
                                <span
                                    class="option_update"
                                    @click="updateRow(scope.row)"
                                ></span>
                            </el-tooltip>
                            <el-tooltip
                                class="item"
                                effect="light"
                                content="评论"
                                v-has="'M1112023'"
                                v-show="scope.row.draftTag === false && scope.row.stageId != '1423154037607493634' && scope.row.c1StatusId === '1423154128074436609'"
                                placement="bottom-start"
                            >
                                <span
                                    class="option_comment"
                                    @click="commentRow(scope.row)"
                                ></span>
                            </el-tooltip>
                            <el-dropdown
                                placement="bottom"
                                :hide-timeout="500"
                                v-show="
                                    !scope.row.draftTag &&
                                    scope.row.feedBackStatus != (2 || 3) &&
                                    scope.row.feedBackStatus === 1 &&
                                    scope.row.stageId != '1423154037607493634'
                                "
                            >
                                <span class="option_more"></span>
                                <el-dropdown-menu slot="dropdown">
                                    <el-dropdown-item
                                        v-has="'M1112008'"
                                        class="applicationItem"
                                        v-show="scope.row.continueToBeTag"
                                    >
                                        <div @click="application(scope.row)">
                                            <span
                                                class="
                                                    hoverMenuItem
                                                    application
                                                "
                                            ></span
                                            ><span>申请上会</span>
                                        </div></el-dropdown-item
                                    >
                                    <el-dropdown-item
                                        v-has="'M1112005'"
                                        class="turnTaskItem"
                                        v-show="
                                    scope.row.draftTag === false &&
                                    scope.row.feedBackStatus === 1 &&
                                    scope.row.stageId != '1423154037607493634'
                                "
                                    >
                                        <div @click="suspendRow(scope.row.id)">
                                            <span
                                                class="hoverMenuItem turnTask"
                                            ></span
                                            ><span>终止</span>
                                        </div>
                                    </el-dropdown-item>
                                    <el-dropdown-item
                                        v-has="'M1112010'"
                                        class="turnDemandItem"
                                        ><div @click="demandRow(scope.row)">
                                            <span
                                                class="hoverMenuItem turnDemand"
                                            ></span
                                            ><span>转需求</span>
                                        </div></el-dropdown-item
                                    >
                                    <el-dropdown-item
                                        v-has="'M1112011'"
                                        class="turnBugItem"
                                        ><div @click="bugRow(scope.row)">
                                            <span
                                                class="hoverMenuItem turnBug"
                                            ></span
                                            ><span>转BUG</span>
                                        </div></el-dropdown-item
                                    >
                                    <el-dropdown-item
                                        v-if="isDelate"
                                        v-has="'M1112012'"
                                        class="isDelateItem"
                                        ><div>
                                            <span
                                                class="hoverMenuItem isDelate"
                                            ></span
                                            ><span>严重超期</span>
                                        </div></el-dropdown-item
                                    >
                                    <el-dropdown-item
                                        v-has="'M1112013'"
                                        class="creatFeedItem"
                                        ><div
                                            @click="creatFeedRow(scope.row.id)"
                                        >
                                            <span
                                                class="hoverMenuItem creatFeed"
                                            ></span
                                            ><span>绑定反馈</span>
                                        </div></el-dropdown-item
                                    >
                                    <el-dropdown-item
                                        v-has="'M1112014'"
                                        class="transferItem"
                                        v-show="
                                            scope.row.draftTag === false &&
                                            scope.row.feedBackStatus === 1 &&
                                            scope.row.stageId !=
                                                '1423154037607493634'
                                        "
                                        ><div
                                            @click="
                                                transferRow(
                                                    scope.row.id,
                                                    scope.row.productId
                                                )
                                            "
                                        >
                                            <span
                                                class="hoverMenuItem transfer"
                                            ></span
                                            ><span>转让</span>
                                        </div></el-dropdown-item
                                    >
                                    <el-dropdown-item
                                        class="creatFeedItem"
                                        v-has="'M1112020'"
                                        ><div
                                            @click="
                                                bugRows(
                                                    scope.row.feedBackNumber
                                                )
                                            "
                                        >
                                            <span
                                                class="hoverMenuItem creatFeed"
                                            ></span
                                            ><span>绑定BUG</span>
                                        </div></el-dropdown-item
                                    >
                                    <el-dropdown-item
                                        class="creatFeedItem"
                                        v-has="'M1112021'"
                                        ><div
                                            @click="
                                                needRow(
                                                    scope.row.feedBackNumber
                                                )
                                            "
                                        >
                                            <span
                                                class="hoverMenuItem creatFeed"
                                            ></span
                                            ><span>绑定需求</span>
                                        </div></el-dropdown-item
                                    >
                                </el-dropdown-menu>
                            </el-dropdown>
                        </div>
                    </template>
                </el-table-column>
            </el-table>
        </el-card>
        <!-- 控制数据展示数量的分页器 -->
        <div class="paginationClock">
            <el-pagination
                background
                @size-change="handleSizeChange"
                @current-change="handleCurrentChange"
                :current-page="queryinfo.pageIndex"
                :page-sizes="[10, 20, 50, 100]"
                :page-size="queryinfo.pageRow"
                layout="total, sizes, prev, pager, next, jumper"
                :total="totalNumber"
            >
            </el-pagination>
        </div>
        <ConfirmDialog
            ref="ConfirmDialog"
            :childStageList="childStageList"
            @refreshPage="onSearch"
        />
        <SuspendDialog ref="SuspendDialog" @refreshPage="onSearch" />
        <UpdateDialog ref="UpdateDialog" @refreshPage="onSearch" />
        <CommentDialog ref="CommentDialog" @refreshPage="onSearch" />
        <ApplicationDialog ref="ApplicationDialog" @refreshPage="onSearch" />
        <CloseDialog ref="CloseDialog" @refreshPages="onSearchID" />
        <FixCloseDialog ref="FixCloseDialog" @refreshPages="onSearchID" />
        <RebackDialog ref="RebackDialog" @refreshPage="onSearch" @refreshsupend="isSuspend"/>
        <GetbackDialog ref="GetbackDialog" @refreshPage="onSearch" />
        <RemoveDialog ref="RemoveDialog" @refreshPage="onSearch" />
        <StartDialog ref="StartDialog" @refreshPage="onSearch" />
        <TaskDialog ref="TaskDialog" @refreshPage="onSearch" />
        <CreatFeedDialog ref="CreatFeedDialog" @refreshPage="onSearch" />
        <TransferDialog ref="TransferDialog" @refreshPage="onSearch" />
        <BugRowsDialog ref="BugRowsDialog" @refreshPage="onSearch" />
        <NeedRowDialog ref="NeedRowDialog" @refreshPage="onSearch" />
    </div>
</template>
<script>
// import { taskPandect } from '@/api/tasks/server'
/* 引入通用的状态按钮组件 */
import TaskStatusBtn from '@/components/taskStatusBtn/taskStatusBtn.vue'
import RadioStatusBtn from '@/components/radioStatusBtn/radioStatusBtn.vue'
import BugRowsDialog from '@/components/bugRowsDialog/bugRowsDialog.vue'
import NeedRowDialog from '@/components/needRowDialog/needRowDialog.vue'
/* 引入通用的弹出框 */
// import CommonDialog from '@/components/commonDialog/commonDialog.vue';
// 确认弹出框
import ConfirmDialog from '@/components/confirmDialog/confirmDialog.vue'
// 终止弹出框
import SuspendDialog from '@/components/suspendDialog/suspendDialog.vue'
// 更新进度弹出框
import UpdateDialog from '@/components/updateDialog/updateDialog.vue'
import CommentDialog from '@/components/commentDialog/commentDialog.vue'

// 申请上会弹出框
import ApplicationDialog from '@/components/applicationDialog/applicationDialog.vue'
// 关闭弹出框
import CloseDialog from '@/components/closeDialog/closeDialog.vue'
import FixCloseDialog from '@/components/fixCloseDialog/fixCloseDialog.vue'

// 回退弹出框
import RebackDialog from '@/components/rebackDialog/rebackDialog.vue'
// 撤回弹出框
import GetbackDialog from '@/components/getbackDialog/getbackDialog.vue'
// 删除弹出框
import RemoveDialog from '@/components/removeDialog/removeDialog.vue'
// 激活弹出框
import StartDialog from '@/components/startDialog/startDialog.vue'
// 转任务弹出框
import TaskDialog from '@/components/taskDialog/taskDialog.vue'
// 绑定反馈弹出框
import CreatFeedDialog from '@/components/creatFeedDialog/creatFeedDialog.vue'
// 转让弹出框
import TransferDialog from '@/components/transferDialog/transferDialog.vue'
/* 引入反馈表单 */
// import CommonFeedForm from './components/feedBack/feedForm';
/* 引入转需求表单 */
// import TurnDemandForm from "./components/feedBack/turnDemand";
/* 引入草稿表单 */
// import DraftFeedForm from './components/feedBack/draftForm';
// 反馈列表
import { FeedBack } from '@/api/feedBack/server'
import { FormOptionSet } from '@/api/setting/service.js'
import FilterTrans from '@/utils/paramsFiler'
import { mapState } from 'vuex'

export default {
    name: 'mySponsor',
    components: {
        RadioStatusBtn,
        TaskStatusBtn,
        ConfirmDialog,
        SuspendDialog,
        UpdateDialog,
        CommentDialog,
        ApplicationDialog,
        CloseDialog,
        FixCloseDialog,
        RebackDialog,
        GetbackDialog,
        RemoveDialog,
        StartDialog,
        TaskDialog,
        CreatFeedDialog,
        TransferDialog,
        BugRowsDialog,
        NeedRowDialog
    },
    props: {},
    data() {
        const EFilterOprator = FilterTrans.EFilterOprator
        // const currentDate = this.getDate({
        //   format: true,
        // });
        return {
            feedBackNumber: '',
            isDemo: false,

            // 超期标识
            StageOverdueTagEnum: [
                {
                    value: false,
                    title: '未超期'
                },
                {
                    value: true,
                    title: '超期'
                }
            ],

            // 产品列表
            ProductList: [],
            // 指派人列表
            userList: [],
            // 阶段列表
            // stageList: [],
            // 解决方案
            FeedBackCloseSet: [],
            // 数据总数
            totalNumber: null,
            // 单行表单数据
            // draftForm: {},
            /* 控制解决方案 是否可点 */
            // isSolutionCase: true,
            // 在这里假定严重超期状态标识
            isDelate: false,
            tableItemsId: '',
            // productsID: '',
            // 控制删除弹出框
            // deleteDialogVisible: false,
            // 控制回退弹出框的显示和隐藏
            // rebackDialogVisible: false,
            // 控制关闭弹出框的显示和隐藏
            // closeDialogVisible: false,
            // 控制转需求弹出框的显示和隐藏
            // demandDialogVisible: false,
            // 控制转任务弹出框的显示和隐藏
            // taskDialogVisible: false,
            // 控制绑定反馈弹出框的显示和隐藏
            // creatFeedDialogVisible: false,
            // 控制激活弹出框的显示与隐藏
            // startDialogVisible: false,
            // 控制更新进度弹出框的显示和隐藏
            // updateDialogVisible: false,
            // 控制申请上报弹出框的显示和隐藏
            // applicationDialogVisible: false,
            // 控制发布/编辑弹出框的显示和隐藏
            // submitDialogVisible: false,
            // 控制申请上会的显示和隐藏
            // applicationDialogVisible: false,
            // 控制转让弹出框的显示和隐藏
            // transferDialogVisible: false,
            // 控制评论弹出框的显示和隐藏
            // commentsDialogVisible: false,

            // 回退弹出框表单内容
            // rebackForm: {
            //     rebackReason: ''
            // },
            // 关闭弹出框表单内容
            // closeForm: {
            //     closeReason: '',
            //     closeSolution: '',
            //     extra: ''
            // },

            // 转需求表单
            // turnDemandForm: {},
            // closeFormRules: {
            //     closeReason: [
            //         { required: true, message: '请选择关闭原因', trigger: 'change' }
            //     ],
            //     closeSolution: [
            //         { required: true, message: '请输入解决方案', trigger: 'change' }
            //     ],
            //     extra: [{ required: false, message: '请输入备注', trigger: 'change' }]
            // },
            // creatFeedForm: {
            //     feedBackId: '',
            //     feedBackReason: ''
            // },
            // creatFeedFormRules: {
            //     feedBackId: [
            //         { required: true, message: '请输入反馈ID', trigger: 'change' }
            //     ],
            //     feedBackReason: [
            //         { required: true, message: '请输入备注', trigger: 'change' }
            //     ]
            // },
            // transferForm: {
            //     feedBackId: '',
            //     feedBackReason: ''
            // },
            // commentsForm: {
            //     feedBackReason: ''
            // },
            // taskForm: {
            //     creater: '',
            //     productId: '',
            //     theirProducts: '',
            //     taskStatus: '',
            //     TheirProducts: '',
            //     taskIdentity: '',
            //     // closingDate: currentDate,
            //     currentResponsiblePerson: '',
            //     department: '',
            //     trackItems: ''
            // },
            // createTaskForm: {
            //     productId: '',
            //     productName: '',
            //     taskStatus: 0,
            //     TheirProducts: '',
            //     taskIdentity: 1,
            //     closingDate: '',
            //     currentResponsiblePerson: '',
            //     department: '',
            //     trackItems: ''
            // },
            C1_C2StatusV: [
                {
                    value: 0,
                    label: '处理中'
                },
                {
                    value: 1,
                    label: '已关闭'
                },
                {
                    value: 2,
                    label: '待明确'
                },
                {
                    value: 3,
                    label: '未开始'
                },
                {
                    value: 4,
                    label: '空'
                }
            ],
            // C1/C2标识
            ctag: [
                {
                    title: 'C1',
                    value: 0
                },
                {
                    title: 'C2',
                    value: 1
                },
                {
                    title: 'C1/C2',
                    value: 2
                }
            ],

            // FIXME: 0.1.1
            // 筛选条件
            SelectConditionForm: {
                feedback_status: '',
                serverRequestTag: '',
                c2Status: '',
                marketProjectStatusId: '', // 营销项目名称
                marketProjectNameId: '', // 营销项目状态名称
                problemTypeParentId: '', // 问题类型
                problemTypeId: '',
                feedBackSourceId: '', // 反馈来源
                ctag: '',
                c1StatusId: '', // 默认C1已关闭
                productId: [''],
                closeTheReason: '',
                content: '',
                InfluenceCategoryId: '',
                stageId: '',
                assignedUserId: '',
                creatorId: '',
                feedback_number: '',
                dateTime: [],
                versionNumber: '',
                startTime: '',
                endTime: '',
                linkType: ''
            },
            searchCondition: [
                {
                    field: 'versionNumber',
                    operator: EFilterOprator.Like
                },
                {
                    field: 'feedback_status',
                    operator: EFilterOprator.Equal
                },
                {
                    field: 'closeTheReason',
                    operator: EFilterOprator.Equal
                },
                {
                    field: 'content',
                    operator: EFilterOprator.Equal
                },
                {
                    field: 'serverRequestTag',
                    operator: EFilterOprator.Equal
                },
                {
                    field: 'linkType',
                    operator: EFilterOprator.Equal
                },
                {
                    field: 'ctag',
                    operator: EFilterOprator.Equal
                },
                {
                    field: 'c1StatusId',
                    operator: EFilterOprator.Equal
                },
                {
                    field: 'c2Status',
                    operator: EFilterOprator.Equal
                },

                {
                    field: 'InfluenceCategoryId',
                    operator: EFilterOprator.Equal
                },
                {
                    field: 'stageId',
                    operator: EFilterOprator.Equal
                },
                {
                    field: 'assignedUserId',
                    operator: EFilterOprator.Equal
                },
                {
                    field: 'creatorId',
                    operator: EFilterOprator.Equal
                },
                {
                    field: 'feedback_number',
                    operator: EFilterOprator.Equal
                },
                {
                    field: 'title',
                    operator: EFilterOprator.Like
                },
                {
                    field: 'marketProjectStatusId',
                    operator: EFilterOprator.Equal
                },
                {
                    field: 'marketProjectNameId',
                    operator: EFilterOprator.Equal
                },
                {
                    field: 'feedBackSourceId',
                    operator: EFilterOprator.Equal
                }
            ],
            queryinfo: {
                pageIndex: 1,
                pageRow: 50
            },
            feedBackList: [],
            // 控制表格的列根据选择动态渲染
            colData: [
                { title: '超期标识', istrue: true },
                { title: 'C1/C2标识', istrue: true },
                { title: '反馈类型', istrue: true },
                { title: '反馈ID', istrue: true },
                { title: '产品名称', istrue: true },
                { title: '反馈标题', istrue: true },
                { title: '处理阶段名称', istrue: true },
                { title: '流程节点', istrue: true },
                { title: 'C2状态', istrue: true },
                { title: '是否服务请求', istrue: true },
                { title: '指派给', istrue: true },
                { title: '关闭原因', istrue: true },
                { title: '解决方案', istrue: true },
                { title: '发布时间', istrue: true },
                { title: '创建人', istrue: true },
                { title: '阶段超期标识', istrue: true },
                { title: '影响类别', istrue: true },
                { title: '营销项目名称', istrue: true },
                { title: '营销项目状态', istrue: true },
                { title: '最后更新时间', istrue: true },
                { title: '版本号', istrue: true },
                { title: '反馈来源', istrue: true },
                { title: '创建人部门', istrue: true },
                { title: '一级问题类型', istrue: true },
                { title: '二级问题类型', istrue: true }
            ],
            colOptions: [],
            colSelect: [],
            marketProjectSecondList: [],
            // 状态按钮
            flowStatusList: [
                {
                    label: '已关闭',
                    value: 0
                },
                {
                    label: '处理中',
                    value: 5
                },
                {
                    label: '已完成',
                    value: 10
                },
                {
                    label: '已过期',
                    value: 20
                }
            ],

            // 用户信息
            // userInfo: {},
            accountInformation: {},
            // selectIndex: '',
            // insertUserList: [],
            // 影响处理阶段列表
            // Stage: [
            //     {
            //         title: '待确认',
            //         value: 'ToBeConfirmed'
            //     },
            //     {
            //         title: '已确认',
            //         value: 'Acknowledged'
            //     }
            // ],
            /* V2新增的更新进度/评论 */
            // isUpdateTarget: '',
            /* 反馈关闭原因列表 */
            closeFeedBackReasonList: [],

            /* 产品ID */
            // productID: '',
            /* 反馈ID */
            // feedBackId: '',

            /* 是否关联BUG/需求 */
            linkType: [
                {
                    value: 1,
                    title: 'BUG'
                },
                {
                    value: 2,
                    title: '需求'
                },
                {
                    value: 3,
                    title: 'BUG/需求'
                },
                {
                    value: 0,
                    title: '反馈'
                }
            ],

            // TODO: 筛选条件优化数据
            versionList: [],
            C1StatusList: [],
            marketProjectFirstList: [],
            feedBackSourceList: [],
            influenceCategory: [],
            MarketingProjectName: [],
            problemTypeList: [],
            childStageList: [],
            //  C2状态按钮
            C2status: [
                {
                    label: '处理中',
                    value: 0
                },
                {
                    label: '已关闭',
                    value: 1
                },
                {
                    label: '待明确',
                    value: 2
                },
                {
                    label: '未开始',
                    value: 3
                },
                {
                    label: '',
                    value: 4
                }
            ]
        }
    },
    computed: {
        ...mapState({
            // feedbackFilter: state => state.situation.feedbackFilter
            sponsorFllter: state => state.situation.sponsorFllter,
            storeUser: state => state.user.userInfo

        })

    },
    // 当路由离开列表页之前
    beforeRouteLeave(to, from, next) {
        // 当to的路由为详情页面时且isFilters为true（列表页面进行了筛选）时触发
        if (from.path === '/mySponsor') {
            // 将筛选项赋值给feedbackFilter
            // this.$store.commit('setFeedbackFilter', this.filters)
            this.$store.dispatch('situation/setSponsorFilter', this.SelectConditionForm)
        }
        next()
    },
    // 当路由进入列表页之前
    beforeRouteEnter(to, from, next) {
        console.log(to, from, next)
        // 当from的路由为详情页面时触发
        if (to.path === '/mySponsor') {
            next((vm) => {
                console.log('/mySponsor', vm.$store.state.situation.sponsorFllter)
                if (vm.$store.state.situation.sponsorFllter !== {}) {
                    // 把feedbackFilter值赋给当前筛选项的对象
                    vm.SelectConditionForm = vm.$store.state.situation.sponsorFllter
                    // vm.SelectConditionForm.dateTime = []
                    vm.SelectConditionForm.productId = []
                }
            })
        } else {
            next()
        }
        // beforeRouteEnter中不能直接获得this，需要 next ((vm) =>{ vm.$stroe.state.sponsorFllter })这样获取，而且next里的方法要在create之后执行
    },
    created() {
        // this.SelectConditionForm.productId.push('')
        //  创建表格显示项
        var _this = this
        for (let i = 0; i < _this.colData.length; i++) {
            _this.colSelect.push(_this.colData[i].title)
            // if (_this.colData[i].title == "所属产品") {
            //   //初始化不想展示的列可以放在这个条件里
            //   continue;
            // }
            _this.colOptions.push(_this.colData[i].title)
        }
    },
    watch: {
        /**
         * @description:监听表格显示项
         * @param {Array} valArr 未选中的字段数组
         */
        colOptions(valArr) {
            var arr = this.colSelect.filter(i => valArr.indexOf(i) < 0) // 未选中
            this.colData.filter(i => {
                if (arr.indexOf(i.title) != -1) {
                    i.istrue = false
                } else {
                    i.istrue = true
                }
            })
            this.$nextTick(() => {
                this.$refs.tableDataRef.doLayout()
            })
            // 将用户的配置习惯保存在本地
            // console.log('存字段配置', this.colOptions)
            localStorage.setItem('settingFeedBackLists', JSON.stringify(this.colOptions))
            // this.SaveFieldAsync(this.colOptions);
        }
    },
    mounted() {
        this.SelectConditionForm.productId.push('')
        this.getProductList()
        // 筛选条件 --时间初始化
        // this.dateTimeInitialise()
        // 获取用户定义字段
        const settingArr = JSON.parse(localStorage.getItem('settingFeedBackLists'))
        if (settingArr != null) {
            this.colOptions = settingArr
        }

        this.getUserList()
        // this.getStageList()
        // 获得当前用户信息

        this.getChildStageList()
        this.getC1StatusList()
        this.getVersionList()
        this.getCloseFeedBackReasonList()

        // this.getMarketProjectFirstList('MARKETING_PROJECT_NAME') // 营销项目名称
        // this.getMarketProjectFirstList('MARKETING_PROJECT_BIG') // 营销项目名称
        // this.getMarketProjectFirstList('MARKETING_PROJECT_SMALL')
        // this.getMarketProjectFirstList('SOURCE_FEEDBACK') // 反馈来源列表
        // this.getMarketProjectFirstList('PROBLEM_TYPES') // 问题类型列表
        // this.getMarketProjectFirstList('IMPACT_CATEGORY') // 影响类别按钮
        this.getMarketProjectFirstList()

        const str = localStorage.getItem('onSearchID')
        // console.log(str)
        if (str != '反馈ID' && str != null) {
            const str1 = localStorage.getItem('onID')
            this.$refs.TaskDialog.show(str, str1)
        }
        this.getuserId().then(() => {
            this.onSearch()
        })
    },

    filters: {
        /**
         * @description:文字过滤器
         * @param {String} _val 传入的值
         * @param {Array} _list 定义的转换数组
         */
        transferSeverity(_val, _list) {
            let str = ''
            _list.findIndex(_item => {
                if (_item.value === _val) {
                    str = _item.title
                    return true
                } else {
                    return false
                }
            })
            return str
        },
        /**
     * @description:时间过滤器
     * @param {Date} _val
     * @return {String} str 转换格式后的字符串
     */
        dateTime(_val) {
            let str = ''
            str = this.dayjs(_val).format('YYYY-MM-DD HH:mm:ss')
            return str
        },
        /**
     * @description:字符串长度过滤器
     * @param {String} _val
     * @return {String} 字符串切割后的字符串
     */
        formatData(_val) {
            if (_val) {
                return _val.substring(0, 10)
            }
            return ''
        },
        formatTimer: function(value) {
            if (value) {
                const date = new Date(value)
                const y = date.getFullYear()
                let MM = date.getMonth() + 1
                MM = MM < 10 ? '0' + MM : MM
                let d = date.getDate()
                d = d < 10 ? '0' + d : d
                let h = date.getHours()
                h = h < 10 ? '0' + h : h
                let m = date.getMinutes()
                m = m < 10 ? '0' + m : m
                let s = date.getSeconds()
                s = s < 10 ? '0' + s : s
                return y + '-' + MM + '-' + d + ' ' + h + ':' + m + ':' + s
            } else {
                return value
            }
        }
    },
    methods: {
        istodemo() {
            this.isDemo = !this.isDemo
            console.log(this.isDemo)
        },
        onInput() {
            this.$forceUpdate()
        },
        async getFeedBackCloseSet(_val) {
            this.SelectConditionForm.content = ''
            this.FeedBackCloseSet = []
            //  根据当前id 获得解决方案下拉列表
            try {
                const result = await FeedBack.FormOptionGetListItemAsync({
                    id: _val,
                    type: 'FEEDBACK_CLOSE_SET'
                })
                if (result.success) {
                    this.FeedBackCloseSet = result.data
                }
            } catch (err) {
                console.log(err)
            }
        },
        changeBigCatlog(val) {
            console.log(val)

            let list = []
            this.marketProjectSecondList = []
            this.marketProjectFirstList.forEach(element => {
                if (element.id == val) {
                    list = element.children
                }
            })
            this.SelectConditionForm.problemTypeId = ''
            this.marketProjectSecondList = list
            // console.log(this.marketProjectFirstList[index])
        },

        util(v, t) {
            if (v.constructor == Date) {
                return v
            } else if (v.constructor == Number) {
                t = 2
            } else if (v.constructor == String) {
                if (/Date\([\d|\-]*\)/.test(v)) {
                    t = 2
                } else if (/^[+/-]?[\d]*$/.test(v)) {
                    t = 2
                }
            } else {
                return null
            }
            t = t || 1 //
            if (t == 1) {
                v = v.replace(/[^\d|^\-|^\\|^:|^\.]/g, ' ')
                return new Date(v.replace(/-/g, '/'))
            } else {
                var date = new Date(parseInt(this.getInt(v), 10))
                return date
            }
        },

        /**
     * @description: 筛选时间初始化
     */
        // dateTimeInitialise() {
        //     var date = new Date()
        //     var lastDate = new Date(date - 1000 * 60 * 60 * 24 * 30) // 最后30天可以更改，意义：是获取多少天前的时间
        //     console.log(date)
        //     console.log(lastDate)
        //     if (this.SelectConditionForm != {} && this.SelectConditionForm.length > 0) {
        //         this.SelectConditionForm.dateTime.push(lastDate)
        //         this.SelectConditionForm.dateTime.push(date)
        //     }
        // this.SelectConditionForm.dateTime.push(lastDate)
        // this.SelectConditionForm.dateTime.push(date)
        // },
        onSearchID(data) {
            // console.log(data)
            if (data != '反馈ID' && data != null) {
                this.onSearch()
                const str = localStorage.getItem('onID')
                this.$refs.TaskDialog.show(data, str)
            } else {
                this.onSearch()
            }
        },
        //     /**
        //  * @description: 绑定反馈判断
        //  * @param {String} event 绑定反馈的主键
        //  */
        // async onClickblur(event) {
        //     const arr = {
        //         id: this.tableItemsId,
        //         linkFeedBackNumber: event
        //     }
        //     try {
        //         const result = await FeedBack.FeedBackBindingJudgeAsync(arr)
        //         if (result.success) {
        //             this.$message.success(result.message)
        //         } else {
        //             this.$message.error(result.message)
        //         }
        //     } catch (err) {
        //         console.log(err)
        //     }
        // },
        async getMarketProjectFirstList() {
            try {
                const result = await FormOptionSet.FormOptionSetGetAllAsync()
                if (result.success) {
                    this.buildTemplateData(result.data)
                    // console.log(result.data)
                } else {
                    this.$message.error(result.message)
                }
            } catch (err) {
                this.$message.error('服务器异常')
            }
        },
        buildTemplateData(_data) {
            this.MarketingProjectName = _data.marketProjectName
            this.problemTypeList = _data.problemTypeSets
            this.influenceCategory = _data.impactCategorySets
            this.feedBackSourceList = _data.sourceFeedbackSets
            this.marketProjectFirstList = _data.marketProjects
        },

        //     /**
        //  * @description:获取当前用户信息
        //  */
        async getuserId() {
            try {
                const result = await FeedBack.UserGetUserInfoAsync()
                if (result.success) {
                    console.log('获取当前账号信息', result.data)
                    this.accountInformation = result.data
                    this.SelectConditionForm.creatorId = this.accountInformation.id
                }
            } catch (err) {
                console.log(err)
            }
        },

        /**
     * @description:保存字段配置
     * @param {Array[String]} _val
     */
        async SaveFieldAsync(_val) {
            // 根据产品ID获得指派人列表
            try {
                const result = await FeedBack.SaveFieldAsync(_val)
                if (result.success) {
                    console.log('Success')
                }
            } catch (err) {
                console.log(err)
            }
        },

        /**
     * @description:加载用户自定义配置字段
     */
        async GetLoadFiledAsync() {
            // 根据产品ID获得指派人列表
            try {
                const result = await FeedBack.GetLoadFiledAsync()
                if (result.success) {
                    this.colOptions = result.data
                }
            } catch (err) {
                console.log(err)
            }
        },

        //     /**
        //  * @description:获取反馈关闭原因
        //  */
        async getCloseFeedBackReasonList() {
            try {
                const result = await FeedBack.FormOptionGetListItemAsync({
                    type: 'FEEDBACK_CLOSE_SET'
                })
                if (result.success) {
                    this.closeFeedBackReasonList = result.data
                }
            } catch (err) {
                console.log(err)
            }
        },

        /**
     * @description: 获取所有产品信息
     */
        async getProductList() {
            try {
                const result = await FeedBack.getProductListByCurrentUser()
                if (result.success) {
                    this.ProductList = result.data
                }
            } catch (err) {
                console.log(err)
            }
        },

        /**
     * @description: 处理时间格式
     * @param {Date} type 时间对象
     * @return {String}  规则拼接的字符串
     */
        getDate(type) {
            const date = new Date()
            let year = date.getFullYear()
            let month = date.getMonth() + 1
            let day = date.getDate()
            if (type === 'start') {
                year = year - 60
            } else if (type === 'end') {
                year = year + 2
            }
            month = month > 9 ? month : '0' + month
            day = day > 9 ? day : '0' + day
            return `${year}-${month}-${day}`
        },

        /**
     * @description:获取指派人列表
     */
        async getUserList() {
            try {
                const result = await FeedBack.GetAllUserAsync()
                if (result.success) {
                    this.userList = result.data
                }
            } catch (err) {
                console.log(err)
            }
        },
        /**
     * @description:页面加载函数
     */
        onSearch() {
            // this.dateTimeInitialise()
            this.filter = FilterTrans.buildPageRequest(this.SelectConditionForm, this.searchCondition)
            this.getFeedBackList()
        },
        /**
     * @description:页面加载函数
     */
        onSearchs() {
            // this.dateTimeInitialise()
            this.filter = FilterTrans.buildPageRequest(this.SelectConditionForm, this.searchCondition)
            this.getFeedBackLists()
        },
        onSearchKuang(type) {
            if (type == 'self') {
                this.SelectConditionForm.creatorId = this.storeUser.id
            }

            this.filter = FilterTrans.buildPageRequest(this.SelectConditionForm, this.searchCondition)
            console.log('this.filter', this.filter)
            this.getFeedBackListKuang()
        },

        /**
     * @description:导出表格
     */
        exportCharts() {
            this.tasklist = []
            this.filter = FilterTrans.buildPageRequest(this.SelectConditionForm, this.searchCondition)
            this.fileDownload()
        },

        /**
     * @description:时间处理函数
     * @param {*} data 时间
     * @return {*}
     */
        getTime(data) {
            const value =
                data.getFullYear() +
                '-' +
                this.checkTime(data.getMonth() + 1) +
                '-' +
                this.checkTime(data.getDate()) +
                ' ' +
                this.checkTime(data.getHours()) +
                ':' +
                this.checkTime(data.getMinutes()) +
                ':' +
                this.checkTime(data.getSeconds())
            return value
        },
        getTimes(data) {
            const value =
                data.getFullYear() +
                '-' +
                this.checkTime(data.getMonth() + 1) +
                '-' +
                this.checkTime(data.getDate() + 1) +
                ' ' +
                this.checkTime(data.getHours()) +
                ':' +
                this.checkTime(data.getMinutes()) +
                ':' +
                this.checkTime(data.getSeconds())
            return value
        },

        /**
     * @description:显示转换
     * @param {Nummber} i
     * @return {Number} 转换后的数字
     */
        checkTime(i) {
            if (i < 10) {
                i = '0' + i
            }
            return i
        },

        /**
     * @description:构建filter实例对象
     * @param {Object} _filter
     * @return {Object} 构建后的filter对象
     */
        handleForm(_filter) {
            const filters = FilterTrans.filterParam(_filter.queryFilter.filters)
            const filter = JSON.parse(JSON.stringify(_filter))
            filter.queryFilter.filters = filters
            filter.orderConditions = [
                {
                    sortDirection: '1',
                    sortField: 'feedback_number'
                }
            ]
            if (this.SelectConditionForm.problemTypeId && this.SelectConditionForm.problemTypeId != '') {
                filters.push({
                    field: 'problemTypeId',
                    operator: 0,
                    value: this.SelectConditionForm.problemTypeId
                })
            }
            if (this.SelectConditionForm.problemTypeParentId && this.SelectConditionForm.problemTypeParentId != '') {
                filters.push({
                    field: 'problemTypeParentId',
                    operator: 0,
                    value: this.SelectConditionForm.problemTypeParentId
                })
            }
            // if (!this.SelectConditionForm.productId.includes('')) {
            if (!this.SelectConditionForm.productId.includes('') && this.SelectConditionForm.productId != [] && this.SelectConditionForm.productId.length > 0) {
                filters.push({
                    field: 'productId',
                    operator: 7,
                    value: this.SelectConditionForm.productId
                })
            }

            filter.pageIndex = this.queryinfo.pageIndex
            filter.pageRow = this.queryinfo.pageRow
            const time = this.SelectConditionForm.dateTime

            if (time.length) {
                const startTime = this.getTime(time[0])
                const endtTime = this.getTimes(time[1])
                filters.push({
                    field: 'createTime',
                    operator: 2,
                    value: startTime
                })
                filters.push({
                    field: 'createTime',
                    operator: 4,
                    value: endtTime
                })
            }

            return filter
        },
        /**
     * @description:构建filter实例对象
     * @param {Object} _filter
     * @return {Object} 构建后的filter对象
     */
        handleFormKuang(_filter) {
            this.queryinfo.pageIndex = 1
            const filters = FilterTrans.filterParam(_filter.queryFilter.filters)
            const filter = JSON.parse(JSON.stringify(_filter))
            filter.queryFilter.filters = filters
            filter.orderConditions = [
                {
                    sortDirection: '1',
                    sortField: 'feedback_number'
                }
            ]
            if (this.SelectConditionForm.problemTypeId && this.SelectConditionForm.problemTypeId != '') {
                filters.push({
                    field: 'problemTypeId',
                    operator: 0,
                    value: this.SelectConditionForm.problemTypeId
                })
            }
            if (this.SelectConditionForm.problemTypeParentId && this.SelectConditionForm.problemTypeParentId != '') {
                filters.push({
                    field: 'problemTypeParentId',
                    operator: 0,
                    value: this.SelectConditionForm.problemTypeParentId
                })
            }
            // if (!this.SelectConditionForm.productId.includes('')) {
            if (!this.SelectConditionForm.productId.includes('') && this.SelectConditionForm.productId != [] && this.SelectConditionForm.productId.length > 0) {
                filters.push({
                    field: 'productId',
                    operator: 7,
                    value: this.SelectConditionForm.productId
                })
            }

            filter.pageIndex = this.queryinfo.pageIndex
            filter.pageRow = this.queryinfo.pageRow
            const time = this.SelectConditionForm.dateTime

            if (time.length) {
                const startTime = this.getTime(time[0])
                const endtTime = this.getTimes(time[1])
                filters.push({
                    field: 'createTime',
                    operator: 2,
                    value: startTime
                })
                filters.push({
                    field: 'createTime',
                    operator: 4,
                    value: endtTime
                })
            }
            return filter
        },
        // 异步下载方法
        async fileDownload() {
            try {
                const data = this.handleForm(this.filter)
                data.pageRow = 3000
                data.pageIndex = 1
                data.fileName = '我的发起'
                await FeedBack.ExportAsync(data)
            } catch (err) {
                this.$message.error('服务器异常')
            }
        },

        /**
        * @description：跳转创建反馈
        */
        toinsert() {
            this.$router.push('/createFeedBack')
        },

        //     /**
        //  * @description: 确认转任务
        //  */
        //     deleteConfirm() {
        //         this.DeleteAsync({ id: this.tableItemsId })
        //     },

        /**
     * @description: 编辑反馈
     * @param {String} _id 主键ID
     */
        async submitForm(_id) {
            this.$router.push({ path: 'editFeedBack?editId=' + _id })
        },

        /**
     * @description: 分页器
     * @param {Number} _val 页码
     */
        handleSizeChange(_val) {
            this.queryinfo.pageRow = _val
            this.onSearch()
        },

        /**
     * @description: 点击切换页码
     * @param {Number} _val 页码
     */
        handleCurrentChange(_val) {
            // console.log(_val)
            this.queryinfo.pageIndex = _val
            this.onSearch()
        },

        /**
     * @description: 重置页面筛选条件
     */
        reset() {
            this.queryinfo.pageIndex = 1
            this.marketProjectSecondList = []
            this.FeedBackCloseSet = []
            this.$refs['SelectConditionForm'].resetFields()
            this.SelectConditionForm.productId.push('')
            // this.dateTimeInitialise()
            // this.onSearch()
        },

        /**
     * @description:中止方法
     * @param {String} 主键ID
     */
        suspendRow(id) {
            this.$refs.SuspendDialog.show(id)
        },

        /**
     * @description: 回退方法
     * @param {String} id 主键ID
     */
        rebackRow(id) {
            this.$refs.RebackDialog.show(id)
        },
        getBackRow(id) {
            this.$refs.GetbackDialog.show(id)
        },
        bugRows(number) {
            this.$refs.BugRowsDialog.show(number)
        },
        needRow(number) {
            this.$refs.NeedRowDialog.show(number)
        },

        /**
     * @description: 关闭方法
     * @param {String} id 主键ID
     */
        closeRow(id, feedBackNumber, activateJustNowTag) {
            // for (var i = 0; i < this.feedBackList.length; i++) {
            //     const item = this.feedBackList[i]
            //     if (item.id === id) {
            //         this.selectIndex = i
            //     }
            // }
            this.$refs.CloseDialog.show(id, feedBackNumber, activateJustNowTag)
        },
        /**
     * @description: 修改关闭方法
     * @param {String} id 主键ID
     */
        fixCloseRow(id, feedBackNumber) {
            // for (var i = 0; i < this.feedBackList.length; i++) {
            //     const item = this.feedBackList[i]
            //     if (item.id === id) {
            //         this.selectIndex = i
            //     }
            // }
            this.$refs.FixCloseDialog.show(id, feedBackNumber)
        },

        /**
     * @description: 转需求方法
     * @param {Object} row 当前操作行对象
     */
        demandRow(row) {
            // this.feedBackId = row.feedBackId
            // this.productID = row.productId
            this.$router.push({
                path: 'turnDemand?id=' + row.id + '&productId=' + row.productId
            })
        },
        isSuspend(data) {
            console.log(data)
            this.suspendRow(data)
        },
        /**
     * @description: 转任务方法
     * @param {Object} data 当前操作行对象
     * @return {*}
     */
        taskRow(data) {
            console.log(data, data.feedBackNumber, data.id)
            this.$refs.TaskDialog.show(data.feedBackNumber, data.id)
        },

        //     /**
        //  * @description: 查询产品名称
        //  * @param {String} _id 反馈ID
        //  */
        // async getProductId(_id) {
        //     const feedBackId = _id
        //     try {
        //         const result = await taskPandect.GetProductIdByFeedId(feedBackId)
        //         if (result.success) {
        //             this.createTaskForm.productName = result.data.name
        //             const prouctId = result.data.id
        //             // 根据当前产品ID查询责任人
        //             this.insertUserList = []
        //             try {
        //                 const resultList = await FeedBack.GetListItemAsync({
        //                     id: prouctId
        //                 })
        //                 if (resultList.success) {
        //                     this.insertUserList = resultList.data
        //                 }
        //             } catch (err) {
        //                 console.log(err)
        //             }
        //         }
        //     } catch (err) {
        //         console.log(err)
        //     }
        // },

        //     /**
        //  * @description: 查询所在部门
        //  * @param {String} _val 人员ID
        //  */
        //     getPersonDepartment(_val) {
        //         this.createTaskForm.department = ''
        //         this.insertUserList.forEach((item) => {
        //             if (item.id == _val) {
        //                 this.createTaskForm.department = item.department
        //             }
        //         })
        //     },

        /**
     * @description: 删除方法
     * @param {String} id 主键ID
     */
        deleteRow(id) {
            // console.log(id)
            this.$refs.RemoveDialog.show(id)
        },

        /**
     * @description: 确认方法
     * @param {String} id 主键ID
     */
        confirmRow(id) {
            this.$refs.ConfirmDialog.show(id)
        },

        /**
     * @description: 绑定反馈方法
     * @param {String} id 主键ID
     */
        creatFeedRow(id) {
            this.$refs.CreatFeedDialog.show(id)
        },

        /**
     * @description: 转让方法
     * @param {Sting} id 主键ID
     * @param {Sting} productId 产品ID
     */
        transferRow(id, productId) {
            this.$refs.TransferDialog.show(id, productId)
        },

        /**
     * @description: 更新进度方法
     * @param {Object} row 当前操作行对象
     */
        updateRow(row) {
            const string = JSON.stringify(row)
            const stageId = row.stageId
            const trueID = row.id
            this.$refs.UpdateDialog.show(string, stageId, trueID)
        },
        commentRow(row) {
            const string = JSON.stringify(row)
            const stageId = row.stageId
            const trueID = row.id
            this.$refs.CommentDialog.show(string, stageId, trueID)
        },

        /**
     * @description: 申请上会方法
     * @param {Object} row 当前操作行对象
     */
        application(row) {
            const str = JSON.stringify(row)
            this.$refs.ApplicationDialog.show(str)
        },

        /**
     * @description: 激活方法
     * @param {String} id 主键ID
     */
        startRow(id) {
            this.$refs.StartDialog.show(id)
        },
        /**
     * @description: 获取反馈列表数据
     */
        async getFeedBackLists() {
            this.feedBackList = []
            try {
                const data = this.handleForm(this.filter)
                const result = await FeedBack.GetPageAsync(data)
                if (result.success) {
                    for (const item of result.data.data) {
                        if (item.creatorId === this.storeUser.id) {
                            item.accountId = true
                        } else {
                            item.accountId = false
                        }
                    }
                    this.feedBackList = result.data.data
                    this.totalNumber = result.data.total
                }
            } catch (err) {
                console.log(err)
            }
        },

        /**
     * @description: 获取反馈列表数据
     */
        async getFeedBackList() {
            this.feedBackList = []
            const loading = this.$loading({
                lock: true,
                text: '数据加载中',
                spinner: 'el-icon-loading',
                background: 'rgba(0, 0, 0, 0.7)'
            })
            try {
                const data = this.handleForm(this.filter)
                const result = await FeedBack.GetPageAsync(data)
                if (result.success) {
                    loading.close()
                    for (const item of result.data.data) {
                        if (item.creatorId === this.storeUser.id) {
                            item.accountId = true
                        } else {
                            item.accountId = false
                        }
                    }
                    this.feedBackList = result.data.data
                    this.totalNumber = result.data.total
                }
            } catch (err) {
                loading.close()
                console.log(err)
            }
        },
        /**
     * @description: 获取反馈列表数据
     */
        async getFeedBackListKuang() {
            this.feedBackList = []
            const loading = this.$loading({
                lock: true,
                text: '数据加载中',
                spinner: 'el-icon-loading',
                background: 'rgba(0, 0, 0, 0.7)'
            })
            try {
                const data = this.handleFormKuang(this.filter)
                const result = await FeedBack.GetPageAsync(data)
                if (result.success) {
                    loading.close()
                    for (const item of result.data.data) {
                        if (item.creatorId === this.storeUser.id) {
                            item.accountId = true
                        } else {
                            item.accountId = false
                        }
                    }
                    this.feedBackList = result.data.data
                    this.totalNumber = result.data.total
                }
            } catch (err) {
                loading.close()
                console.log(err)
            }
        },

        /**
     * @description: 清空表单
     */
        clearForm() {
            this.FeedBackCloseSet = []
            this.marketProjectSecondList = []
            this.isSolutionCase = true
        },
        /**
     * @description: 转BUG 跳转
     * @param {Object} row 操作当前行的对象
     */
        bugRow(row) {
            this.$router.push({
                path: 'turnBug?id=' + row.id
            })
        },

        /**
     * @description: 反馈详情 跳转
     * @param {Object} row 操作当前行的对象
     */
        tofeedBack(row) {
            const toDeatailPageStatus = row.feedBackStatus
            const id = row.id
            const buttonStatus = row.operationStatus
            const stageId = row.stageId
            if (toDeatailPageStatus == 0) {
                return false
            } else {
                this.$router.push({
                    path: 'Details?id=' + id + '&buttonStatus=' + buttonStatus + '&stageId=' + stageId + '&formType=1'
                })
            }
        },

        /**
     * @description: 获取阶段信息名称
     */
        async getChildStageList() {
            try {
                const result = await FeedBack.GetListChildrenAsync({ type: 'NAME' })
                if (result.success) {
                    for (var i = 0; i < result.data.length; i++) {
                        const item = result.data[i]
                        if (item.id != '1423154037607493634' && item.id != '1423154128091213825') {
                            this.childStageList.push(item)
                        }
                    }
                }
            } catch (err) {
                console.log(err)
            }
        },
        /**
     * @description: 获取流程节点下拉
     */
        async getC1StatusList() {
            try {
                const result = await FeedBack.GetListChildrenAsync({ type: 'STATUS' })
                if (result.success) {
                    this.C1StatusList = result.data
                }
            } catch (err) {
                console.log(err)
            }
        },
        /**
     * @description: 获取版本号下拉
     */
        async getVersionList() {
            this.versionList = []
            try {
                const result = await FeedBack.GetVersionList()
                if (result.success) {
                    console.log('版本号下拉', result.data)
                    this.versionList = result.data
                }
            } catch (err) {
                console.log(err)
            }
        }
    }
}
</script>
<style scoped lang="less" src="./mySponsor.less"></style>
<style scoped lang="less" src="@/assets/style/feedBackDialog.less"></style>
<style scoped>
.myfeed {
    float: right;
    margin: 0 10px 20px 0 !important;
}
</style>
